<?php
session_start();
include "../include/db.php";
include "../include/head.php";
?>
<?php
        $sql = "insert into mailing(companyid,name,introduction,fromemail)
         values('".$_SESSION["companyid"]."','".$_POST["name"]."','".$_POST["introduction"]."','".$_POST["fromemail"]."')"; 
        $conn=getconnection();
        $res = mysql_query($sql, $conn); 
        $err = mysql_error(); 
        if($err)
        { 
          echo "insert record into database".$err; 
        } 
        else
        {
        	echo "<h1>Add mailing list success!</h1>";
        }
        mysql_close($conn);
?>